package cdu.notFound.service.impl;

import cdu.notFound.Dao.ShopCartDao;
import cdu.notFound.Dao.impl.ShopCartDaoImpl;
import cdu.notFound.model.Goods;
import cdu.notFound.model.User;
import cdu.notFound.service.ShopCartService;

import java.util.List;

public class ShopCartServiceImpl implements ShopCartService {

    ShopCartDao shopCartDao = new ShopCartDaoImpl();

    @Override
    public Integer getShopCartNum(int id){
        return shopCartDao.getShopCartNum(id);
    }

    @Override
    public boolean doSaveShoppingCart( int goodsId, int userId) {
        return shopCartDao.doSaveShoppingCart(goodsId,userId);
    }

    @Override
    public List<Goods> findGoodsByUser(User user) {
        return shopCartDao.findGoodsByUser(user);
    }

    @Override
    public boolean removeList(int goodId, int userId) {
        return shopCartDao.removeList(goodId,userId);
    }

}
